#include <cstdint>
#include <iostream>
#include <istream>
#include <vector>
using ll = int64_t;


int main(){
    std::iostream::sync_with_stdio(false);
    std::cin.tie(nullptr);

    ll n,m;
    std::cin>>n>>m;
    std::vector<ll> va(m+1),vb(m+1);
    for(ll i=1;i<=n;i++){
        ll a,b;
        std::cin>>a>>b;
        va[a]++;
        vb[b]++;
    }
    std::vector<ll> pre(2*m+2);
    for(ll i=0;i<=m;i++){
        for(ll j=0;j<=m;j++){
            pre[i+j]+=va[i]*va[j];
            pre[i+j+1]-=vb[i]*vb[j];
        }
    }
    ll ans=0;
    for(ll i=0;i<=2*m;i++){
        ans+=pre[i];
        std::cout<<ans<<'\n';
    }
}